package com.freecloud.javabasics.design.proxy.staticproxy;

import com.freecloud.javabasics.design.proxy.FindJob;

/**
 * 代理对象，帮被代理对象解决找工作难题
 *
 * @Author: maomao
 * @Date: 2019-11-22 10:36
 */
public class BossZhipinProxy implements FindJob {

    FindJob findJob;

    /**
     * 代理模式核心是需要持有被代理对象的引用，
     * 好在代理对象处理完后调用被代理对象。
     * @param job
     */
    public BossZhipinProxy(FindJob job){
        this.findJob = job;
    }


    @Override
    public void findJob() {
        System.out.println("我是Boss直聘,开始帮助找工作");
        findJob.findJob();
        System.out.println("准备面试！");
    }
}
